#include <stdio.h>
#include <math.h>
#include <time.h>
void main()
{
	int i,j;
	int t=0;
	int min=100;
int pingjun=0; 
float min1=100.0;
	int max=0;
 	float MAX1,pingjun1,q;
	float d[100];
	int a[100];
int he=0;
	srand((unsigned)time(NULL));
	for(i=0;i<100;i++)
{
	a[i]=rand()%100;
 he=he+a[i];
pingjun=he/100;
	if(a[i]==0)
{
	d[i]=0;	
}else d[i]=1.0/a[i];
q=q+d[i];
pingjun1=q/100;
printf("%d %d %f\n",i,a[i],d[i]);
}	

		for(j=0;j<100;j++)
{
	if(max<a[j])
	{
max=a[j];

}
if(MAX1<d[j])
{
	MAX1=d[j];
}
if(min>=a[j])
{
	min=a[j];
}
if(min1>=d[j])
{
	min1=d[j];
}
}
printf("max= %d MAX1= %f\n",max,MAX1);
printf("min= %d min1= %f\n",min,min1);
printf("pingjun= %d pingjun1= %f\n",pingjun,pingjun1);
}
